#ifndef EDFPARSER_H
#define EDFPARSER_H

#include "edfmodel.h"

namespace biosignal
{
namespace edf
{

class EDFParser
{
    private:
        static void update_remaining_segment(char* annotation_segment, char*& remaining_segment );
        static double parse_time_traking(EDFModel* edf_model, char* annotation_segment, char*& remaining_segment ) ;
        static void parse_tal(EDFModel* edf_model, char* annotation_segment, char*& remaining_segment );
        static void parse_annotation(EDFModel* edf_model, char* annotation_segment);
        static void fill_time_keeping_and_annotations(EDFModel*, long bytes_skip_until_annotation, long annotation_bytes_in_datarecord);

    public:
        static const char EDF_C[];
        static const char EDF_D[];
        static const char EDF_ANNOTATION[];
        static const char TT_CHARS[];
        static const char ANN_CHAR_START;
        static const char ANN_CHAR_END;
        static const char DURATION_CHAR_START;
        static const char TAL_END_CHAR;
        static const EDFModel* parse( const char* file_name );
};

}
}
#endif // EDFPARSER_H
